/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dale2507.gates.misc;

import org.bukkit.block.Block;

/**
 *
 * @author Dale
 */
public class BlockHelper {
    
    public static boolean isNeighbour(Block b1, Block b2) {
        for (int x=-1; x<=1; x+=2) {
            if (b1.getRelative(x, 0, 0).equals(b2)) return true;
            if (b1.getRelative(0, x, 0).equals(b2)) return true;
            if (b1.getRelative(0, 0, x).equals(b2)) return true;
        }
        return false;
    }
    
}
